NSLU2-Linux
view · edit · print · history

Yes, you can have more than 5 backup jobs

You can only create upto 5 using the web page(s)

You have to create the remainder by adding/editing lines to the [backup] section of the following file.

/etc/CGI_ds.conf

If you want to schedule your backup jobs you will also have to add/edit the following file.

/etc/crontab

This of course implies that you have "unslung" and have telnet or ssh access

The cron jobs control the schedule of the "named" jobs (as you have already discovered)

The last lines in the CGI_ds.conf file contain the details of the named jobs including backup type, direction, usernames, passwords etc.

If you create between 6 and 10 jobs in total you can still then modify, delete and run/execute the backup jobs

If you have more than 10 backup jobs then you can only run/execute the backup jobs from the web page(s)

I run a total of 20 scheduled backup jobs

I have included (fragments of) my backup setup in "crontab" and "CGI_ds.conf" files (with passwords #'d out)

I backup some stuff daily and other stuff once per week

Details of any running jobs (particularly if they get "stuck") appear (transiently) in /mnt/backup and consist of a process ID "lock" file ("<backup_job_name>.PID") and a "mirror"/audit trail of the directory structure being backed-up both named after the backup job name

To clear a "stuck"/"hung" backup job, you simply delete the lock file

  =================================
/etc/crontab (fragment)
=================================
0 3 * * * root /usr/sbin/backup "ian_to_ian" &>/dev/null 
0 4 * * * root /usr/sbin/backup "ian_from_ls" &>/dev/null 
0 1 * * * root /usr/sbin/backup "jenny_to_jenny" &>/dev/null 
0 2 * * * root /usr/sbin/backup "jenny_from_ls" &>/dev/null 
0 5 * * * root /usr/sbin/backup "shareddocs_to_jenny" &>/dev/null 
0 6 * * * root /usr/sbin/backup "shareddocs_from_ls" &>/dev/null 
0 9 * * 2 root /usr/sbin/backup "music_to_ian" &>/dev/null 
0 11 * * 2 root /usr/sbin/backup "music_from_ls" &>/dev/null 
0 9 * * 1 root /usr/sbin/backup "photos_to_ian" &>/dev/null 
0 11 * * 1 root /usr/sbin/backup "photos_from_ls" &>/dev/null 
0 9 * * 3 root /usr/sbin/backup "downloads_to_ian" &>/dev/null 
0 11 * * 3 root /usr/sbin/backup "downloads_from_ls" &>/dev/null 
0 9 * * 4 root /usr/sbin/backup "quake2_to_ian" &>/dev/null 
0 11 * * 4 root /usr/sbin/backup "quake2_from_ls" &>/dev/null 
0 9 * * 5 root /usr/sbin/backup "pinball_to_ian" &>/dev/null 
0 11 * * 5 root /usr/sbin/backup "pinball_from_ls" &>/dev/null 
0 11 * * 6 root /usr/sbin/backup "backups_from_ls" &>/dev/null 
0 13 * * * root /usr/sbin/backup "bernard_from_backup" &>/dev/null 
0 14 * * * root /usr/sbin/backup "john_from_backup" &>/dev/null 
0 15 * * * root /usr/sbin/backup "geoff_from_backup" &>/dev/null

===================================
/etc/CGI_ds.conf (fragment)
===================================
ian_to_ian=2:0:ian::ian:########:ian:/backups/ian:1:1:3:0:am
ian_from_ls=2:1:ian::ian:########:linkstation:/ian:1:1:4:0:am
jenny_to_jenny=2:0:jenny::jenny:########:jenny:/backups/jenny:1:1:1:0:am
jenny_from_ls=2:1:jenny::jenny:########:linkstation:/jenny:1:1:2:0:am
shareddocs_to_jenny=2:0:shareddocs::jenny:########:jenny:/backups/shareddocs:1:1:5:0:am
shareddocs_from_ls=2:1:shareddocs::jenny:########:linkstation:/shareddocs:1:1:6:0:am
music_to_ian=2:0:music::ian:########:ian:/backups/music:1:3:9:0:am
music_from_ls=2:1:music::ian:########:linkstation:/music:1:3:11:0:am
photos_to_ian=2:0:photos::ian:########:ian:/backups/photos:1:2:9:0:am
photos_from_ls=2:1:photos::ian:########:linkstation:/photos:1:2:11:0:am
downloads_to_ian=2:0:downloads::ian:########:ian:/backups/downloads:1:4:9:0:am
downloads_from_ls= 2:1:downloads::ian:########:linkstation:/downloads:1:4:11:0:am
quake2_to_ian=2:0:quake2::ian:########:ian:/backups/quake2:1:5:9:0:am
quake2_from_ls=2:1:quake2::ian:########:linkstation:/quake2:1:5:11:0:am
pinball_to_ian=2:0:pinball::ian:########:ian:/backups/pinball:1:6:9:0:am
pinball_from_ls=2:1:pinball::ian:########:linkstation:/pinball:1:6:11:0:am
backups_from_ls=2:1:backups::ian:########:linkstation:/backup:1:7:11:0:am
bernard_from_backup=2:1:bernard::bernard:########:192.168.123.185:/bernard:1:1:1:0:pm
john_from_backup=2:1:john::john:########:192.168.123.185:/john:1:1:2:0:pm
geoff_from_backup=2:1:geoff::default:########:192.168.123.185:/geoff:1:1:3:0:pm

-Ian White

Also from Ian via the nslu2-linux group:

The job description format starts:

<job-name>=<type>:<direction>:

Where type:

 1 = "Full" backup, i.e. every file (re-)copied
 2 = "Incremental" backup, i.e. only new and modified files are copied
 3 = "Synchronize", i.e. the destination is made to be the *same*
      i.e. files are deleted from the destination as needed

And the <direction>s are:

 0 = "From slug to elsewhere"
 1 = "From elsewhere to the slug"

The only slug-to-slug backup is the disk-to-disk backup.

And the /usr/sbin/backup does not appear to support "From elsewhere to elsewhere" backups

The end of the job string mean?? Sort of crontab nomenclature?

eg: 1:5:2:2:am

[reference: http://tech.groups.yahoo.com/group/nslu2-linux/message/16220]

view · edit · print · history · Last edited by Matt Brennan.
Based on work by Matt Brennan and Glenn.
Originally by ToddZ.
Page last modified on November 25, 2006, at 02:30 AM