Author Topic: Attempting to back system up using Zip command, receiving access denied error.  (Read 8789 times)

Ibrahim Hakeem

  • Full Member
  • ***
  • Posts: 120
  • Karma: +5/-0
    • View Profile
Hi all, I finished an installation + configuration of Arca OS on one of my computers and decided to use the zip program to make a backup in the hopes of it being a bit lighter/quicker than DFSEE. Using the following command found on Blondeguy: zip -qryS cdrive.zip c:\* -x WP?ROOT.?SF

The backup does start but inevitably after a bit of progress I get an Access Denied error. Zip and Unzip have been updated as required through YUM and I am a bit stumped on what could possibly be the source of the issue. I doubt it's anything too grave as it's a brand new installation but I haven't found any possible causes yet...

Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
x:\os2\system\swapper.dat?

Ibrahim Hakeem

  • Full Member
  • ***
  • Posts: 120
  • Karma: +5/-0
    • View Profile
I don't think it's related to Swapper.dat... As far as I'm aware, that's not a file in drive C:.

Mo

  • Jr. Member
  • **
  • Posts: 50
  • Karma: +2/-0
    • View Profile
Hi,

i found this: https://ecsoft2.org/iris, maybe thats the tool you are looking for.
« Last Edit: April 17, 2020, 02:33:19 pm by Moritz »

Neil Waldhauer

  • Hero Member
  • *****
  • Posts: 1024
  • Karma: +24/-0
    • View Profile
    • Blonde Guy
Zip is an excellent way to make a backup. Your problem is that you are doing on a running system.

Boot something else; ArcaOS media is OK, or a second installation. Zip just as you have done. Your back up will be perfect. Restore the same way.
Expert consulting for ArcaOS, OS/2 and eComStation
http://www.blondeguy.com

Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Just did a 
Code: [Select]
zip -rS9 20200417_BanzM_eCS2.1DE.zip m:\* -x delete\* 2>error.logfrom O:\... and backed up my running M: partition. As usual it works. error.log is empty. I've my swapper.dat on another partition. Have to try with symlinks (-y) sometimes.

Maybe you should remove q (-ryS) or add 2>error.log to see what's the problem.

Backing up running system - if you restore then the restored system will have not the latest os2.ini and os2sys.ini changes but the state when the systems was booted. Usually not a big deal. But that's the main reason why it's better to back up when running from a maintenance partition/ArcaOS stick/bootable CD/DVD.


Dave Yeo

  • Hero Member
  • *****
  • Posts: 4787
  • Karma: +99/-1
    • View Profile
I don't think it's related to Swapper.dat... As far as I'm aware, that's not a file in drive C:.

By default it is if you installed to C:. Take a look at your config.sys, search for SWAPPATH. Should be a line like
Code: [Select]
SWAPPATH=C:\OS2\SYSTEM 2048 2048

Doug Bissett

  • Hero Member
  • *****
  • Posts: 1593
  • Karma: +4/-2
    • View Profile
I use ZIP, using -9yrS. There are a few locked files on my boot drive(s), but if you look at which ones they are, you can add them to an exclude file. In my case, they are all things that do not need to be backed up. If you do need to back something up, and can't exclude it, use an alternate boot system, as suggested earlier.

Log files (which should always be closed after writing, but usually aren't), usually don't need to be in a backup.

SWAPPER.DAT is recreated at each boot.

INI files, with the extension ".!!!" don't need to be backed up.

Files in %TEMP% don't need to be backed up (NEVER keep anything in the system temporary file folders).

If you think about it, there are probably other files, and folders, that don't need to be backed up.

You also need to be sure that nothing is open, if you need to back it up.

Okay, the parameters (the order doesn't matter):
-9 is maximum compression. It slows it down a bit, but makes a smaller backup file
-r is to recurse through sub directories
-y is to handle symlinks (VERY important on the %UNIXROOT% drive, but I always use it)
-S is to include hidden, and system, files (VERY important on boot drives,  but I always use it)

The batch file, that I use, is:
Code: [Select]
if exist CDRIVE.ZIP DEL CDRIVE.ZIP
zip.exe -9yrS CDRIVE.ZIP C:\* -x@exclude.list 2>&1 | tee.exe CZIP.LOG
(change to match what you want to back up). The backup is made in the directory where the batch file runs, so exclude that from the backup. I put the backups on my HDD, (for speed), then copy them to alternate media (USB stick, network drive etc.), later. Exclude.list is a file with all of my excludes. I push the output through TEE.EXE, so I get a log file, and I can see what it is doing, at the same time.

I make a batch file, for each drive, then start them all at the same time. Each one goes slower than when run alone, but the overall elapsed time is less. YMMV.

Be sure to TEST your backup, to be sure that it actually does what you think it is doing. To do the UNZIP, I usually use the Archive Tool, as supplied by ArcaOS, AFTER doing a new FORMAT of the drive for a full restore, or just select the parts that you need. This does, of course, require an alternate OS/2 boot system, if the boot drive is involved (I always keep an alternate boot system available). To do the test, i recommend using a different HDD, so you can be sure that it actually works, before you need to depend on the backup. You can, of course, use the UNZIP command (under an OS/2 boot).

NOTE: ArcaOS uses the ZIP.EXE and UNZIP.EXE, that is supplied by RPM/YUM. That won't work, if you don't have the YUM stuff installed (for some reason). There is an older version of ZIP called ZIP2.EXE, in the C:\sys\install directory. It is limited to less than 2 GB files (in, or out), but your boot drive probably qualifies.

Ibrahim Hakeem

  • Full Member
  • ***
  • Posts: 120
  • Karma: +5/-0
    • View Profile
Once again, Neil was correct. I had made the blatant error of not running the zip command from a separate disk. I was able to make a proper backup and restore by using a separate installation

Greg Pringle

  • Full Member
  • ***
  • Posts: 148
  • Karma: +0/-0
    • View Profile
This topic is a perrinial problem for me. Small backups are easy. Zip, xcopy, cp will all work.
Some believe that incremental backups are the way.

I am lazy and have a large number of drives with large numbers of files so those methods don't work.

If there has been JFS crashes then you could really be in trouble due to pointer problems which are uncorrectable.

I came up with a java based solution which is not perfect but works.
It has 3 phases.
1. a listing of all files and directories is creaed in a file.
2. the listing is split into smaller listings based on number of files and data size.
3. the backup is performed by individually running each listing from step 2

Step 3 will either run or fail. When it failes the section of the file structure will be obvious.
The listing file can be altered to bypass bad files and then restart the backup where it left off.

Painful but will work on any drive that can be read. Even with bad JFS sections.


Andi B.

  • Hero Member
  • *****
  • Posts: 811
  • Karma: +11/-2
    • View Profile
Why don't you use something like 'rar a -r -ac -v2000m ....' for bigger drives? Or rsync (LuckyBackup)?

My boot drives are all well below 2GB so I use zip for them as zip is faster then rar. But for my data partition I use rar as above and additionally incremental backups with 'rar a -r -ao -ac -v2000m -ag+YYYYMMDD-NN AutoBak .....

Full script for incremental backup -
Code: [Select]
@REM script zum Sichern aller neuen Daten auf M: nach O:\...
@REM -ac clear achive bit
@REM -ag Generate archive name using the current date
@REM -ao Add files with Archive attribute set

call wait_cli 30

@mode 80,100

@o:
@cd \Banzai\TäglichesBackup
@rar a -r -ao -ac -m1 -v2000m -ag+YYYYMMDD-NN -x\delete\* -x\Trash _M_AutoBak m:\* 2>Error_M.log 1 tee AutoBackup_M.log

Joop

  • Hero Member
  • *****
  • Posts: 633
  • Karma: +5/-0
    • View Profile
Trouble with archive systems is that you need that archive system to set something back, sometimes this is only possible as restoring all. I use dSync, very small package which works with scripts. You get a backup which is the same as your harddrive (depends how you do your setup with the scripts). More than once I had ruined a file and I just copy that single file back to the harddrive. Also very usable to store a drive or directory which you can read occasionally  if needed but which is no longer on your system. Furthermore you do progress in your way of handling and thinking about your computer setup, so a mirror or full backup of your drive might not work anymore because you do have other thoughts, plans or layout. With dSync backup you just copy back what you need to an other place then where it was originally backupped from. So in the end more freedom.