Last active
March 26, 2023 11:57
Revisions
-
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -80,6 +80,8 @@ interval halfyearly 10 # link_dest 1 sync_first 1 # Verbose level, 1 through 5. # 1 Quiet Print fatal errors only # 2 Default Print errors and warnings only -
frankkusters revised this gist
Feb 17, 2015 . 2 changed files with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,6 +51,7 @@ Edit `/opt/etc/rsnapshot.conf`. * `snapshot_root`: make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. * `interval`: choose what suits you. Do read the [rsnapshot documentation on what these values mean](http://www.rsnapshot.org/howto/1.2/rsnapshot-HOWTO.en.html#interval). * `rsync_long_args`: using SSH and checksumming slows transfer speed down to 3MB/sec. Assuming a gigabit network, the NS2 CPU is the bottleneck. Setting `--whole-file` and directly using the rsync daemon on the DS will achieve full transfer speeds. * `sync_first`: if a backup is interrupted, you have an incomplete backup, which will take part in the rotation. Using `sync_first` eliminates this problem. Do take note of the special way you need to call rsnapshot (see `crontab` below). * `backup`: you need to specify every share explicitly. My `rsnapshot.conf` is shown below. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ # m h dom mon dow command # until things are a bit faster, make backups every 2 hours - and skip hourly backups at night 0 0,6,8,10,12,14,16,18,20,22 * * * /opt/bin/rsnapshot sync && /opt/bin/rsnapshot hourly 0 4 * * * /opt/bin/rsnapshot daily 0 3 * * 1 /opt/bin/rsnapshot weekly 0 2 2 * * /opt/bin/rsnapshot monthly -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -25,7 +25,7 @@ The NS2 does not have the ability to create backups from another NAS (for exampl 3. [Enable SSH](http://lacie.nas-central.org/wiki/Enabling_ssh_using_a_symlink_on_an_USB-stick_(Network_space_2)) (the procedure for firmware 2.2.8 should be fine). 4. As suggested in the manual for step 3, [set up login with SSH keys](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2). This makes it easier to administrate the NS2, as the password for root is disabled on every boot. 5. [Install `ipkg`](http://forum.nas-central.org/viewtopic.php?f=236&t=2348). Some small details differ. See `install-ipkg.sh` below. -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 0 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -67,5 +67,3 @@ For added security ================== - Disable SSH logins on the NS2 (disable `sshd`). -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -50,7 +50,7 @@ Edit `/opt/etc/rsnapshot.conf`. * `snapshot_root`: make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. * `interval`: choose what suits you. Do read the [rsnapshot documentation on what these values mean](http://www.rsnapshot.org/howto/1.2/rsnapshot-HOWTO.en.html#interval). * `rsync_long_args`: using SSH and checksumming slows transfer speed down to 3MB/sec. Assuming a gigabit network, the NS2 CPU is the bottleneck. Setting `--whole-file` and directly using the rsync daemon on the DS will achieve full transfer speeds. * `backup`: you need to specify every share explicitly. My `rsnapshot.conf` is shown below. -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 5 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,10 +48,12 @@ Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. * `snapshot_root`: make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. * `interval`: choose what suits you. Do read the [rsnapshot documentation on what these values mean](http://www.rsnapshot.org/howto/1.2/rsnapshot-HOWTO.en.html#interval). * `rsync_long_args`: using SSH and checksumming slows transfer speed down to 3MB/sec. Assuming a gigabit network, setting `--whole-file` and directly using the rsync daemon on the DS will achieve full transfer speeds. * `backup`: you need to specify every share explicitly. My `rsnapshot.conf` is shown below. Running rsnapshot automatically -
frankkusters revised this gist
Feb 17, 2015 . 2 changed files with 1 addition and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,7 +44,6 @@ Setting up an rsync connection from the NS2 to the Synology DiskStation 5. Remove world read permissions from the file - else rsync will complain: `chmod o-r /opt/etc/diskstation-rsync-password.txt` Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -164,4 +164,4 @@ lockfile /opt/var/run/rsnapshot.pid # RSYNC.SAMBA.ORG #backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/ backup rsync://[email protected]/unsorted/ unsorted/ -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -39,9 +39,7 @@ Setting up an rsync connection from the NS2 to the Synology DiskStation 2. [Enable the rsync daemon](https://www.synology.com/en-us/knowledgebase/tutorials/496) on the DS. Otherwise you'll get strange rsync errors on the NS2. 4. Create a file named `/opt/etc/diskstation-rsync-password.txt` with the password of the DS `root` account in it. Using the `root` account is required, because DSM does not allow reading of shares through rsync for other user accounts. 5. Remove world read permissions from the file - else rsync will complain: `chmod o-r /opt/etc/diskstation-rsync-password.txt` -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # m h dom mon dow command # until things are a bit faster, make backups every 2 hours - and skip hourly backups at night 0 0,6,8,10,12,14,16,18,20,22 * * * /opt/bin/rsnapshot hourly 0 4 * * * /opt/bin/rsnapshot daily 0 3 * * 1 /opt/bin/rsnapshot weekly 0 2 2 * * /opt/bin/rsnapshot monthly 0 2 1 3,9 * /opt/bin/rsnapshot halfyearly -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ # m h dom mon dow command # until things are a bit faster, make backups every 2 hours - and skip backups at night 0 0,6,8,10,12,14,16,18,20,22 * * * /opt/bin/rsnapshot hourly 50 5 * * * /opt/bin/rsnapshot daily 40 5 * * 1 /opt/bin/rsnapshot weekly 30 5 2 * * /opt/bin/rsnapshot monthly 30 5 1 3,9 * /opt/bin/rsnapshot halfyearly -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ # m h dom mon dow command # until things are a bit faster, make backups every 2 hours 0 0,6,8,10,12,14,16,18,20,22 * * * /opt/bin/rsnapshot hourly 50 4 * * * /opt/bin/rsnapshot daily 40 4 * * 1 /opt/bin/rsnapshot weekly 30 4 2 * * /opt/bin/rsnapshot monthly -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 4 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,7 +63,7 @@ cmd_du /opt/bin/du # i.e. hourly, daily, weekly, etc. # ######################################### interval hourly 10 interval daily 7 interval weekly 4 interval monthly 12 @@ -106,11 +106,6 @@ logfile /opt/var/log/rsnapshot #include ??? #exclude ??? #exclude ??? # The include_file and exclude_file parameters, if enabled, simply get # passed directly to rsync. Please look up the --include-from and @@ -122,7 +117,7 @@ exclude /tmp # Default rsync args. All rsync commands have at least these options set. # #rsync_short_args -a rsync_long_args --delete --numeric-ids --relative --delete-excluded --whole-file --password-file=/opt/etc/diskstation-rsync-password.txt # ssh has no args passed by default, but you can specify some here. # @@ -162,11 +157,11 @@ lockfile /opt/var/run/rsnapshot.pid # EXAMPLE.COM #backup [email protected]:/home/ example.com/ #backup [email protected]:/ ./ # CVS.SOURCEFORGE.NET #backup_script /usr/local/bin/backup_rsnapshot_cvsroot.sh cvs.sourceforge.net/ # RSYNC.SAMBA.ORG #backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/ backup rsync://[email protected]/unsorted/Downloads/ unsorted/Downloads/ -
frankkusters revised this gist
Feb 17, 2015 . 1 changed file with 11 additions and 9 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -32,25 +32,27 @@ The NS2 does not have the ability to create backups from another NAS (for exampl 6. Install rsnapshot: `ipkg install rsnapshot`. Setting up an rsync connection from the NS2 to the Synology DiskStation ======================================================================= 1. [Enable the User Home Service](https://www.synology.com/en-us/knowledgebase/tutorials/449) on the DS. 2. [Enable the rsync daemon](https://www.synology.com/en-us/knowledgebase/tutorials/496) on the DS. Otherwise you'll get strange rsync errors on the NS2. 3. Create a user account on the DS named `backup`. Keep the generated password that DSM gives you. Give the user read-only access on all shares. 4. Create a file named `/opt/etc/diskstation-rsync-password.txt` with the password of the DS `backup` account in it. 5. Remove world read permissions from the file - else rsync will complain: `chmod o-r /opt/etc/diskstation-rsync-password.txt` Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. * Make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. * My `rsnapshot.conf` is shown below. The excludes in the configuration are inspired by [this Stack Exchange question](http://unix.stackexchange.com/questions/104743/entries-i-can-safely-exclude-doing-backups). -
frankkusters revised this gist
Feb 16, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this Note: proficiency with Linux is assumed! \* Although rsnapshot is easy to configure, it is **slow** ([see here for more info](http://serverfault.com/questions/46852/doing-an-rm-rf-on-a-massive-directory-tree-takes-hours) - note that the NS2 also uses XFS). On my NS2, backing up 450GB (250,000 files) takes about 45 minutes, of which 25 minutes is spent on `rm -rf hourly.24`. Therefore I will look at transitioning to rdiff-backup in the near future. Installing software on the Network Space 2 -
frankkusters revised this gist
Feb 16, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,10 +7,12 @@ I need a backup solution for my Synology DS215j NAS. My requirements are: - a restore solution that is really easy to use for everyone else in my house. - highly frequent backups. With modern storage technologies, it's unnecessary to lose more than an hour's worth of work. Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this task. Let's install and configure rsnapshot*! Note: proficiency with Linux is assumed! * Although rsnapshot is easy to configure, it is **slow** ([see here for more info](http://serverfault.com/questions/46852/doing-an-rm-rf-on-a-massive-directory-tree-takes-hours) - note that the NS2 also uses XFS). On my NS2, backing up 450GB (250,000 files) takes about 45 minutes, of which 25 minutes is spent on `rm -rf hourly.24`. Therefore I will look at transitioning to rdiff-backup in the near future. Installing software on the Network Space 2 ========================================== -
frankkusters revised this gist
Feb 12, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -43,6 +43,8 @@ To be able to make backups of the entire system, including DSM configuration and 4. [Enable the rsync daemon](https://www.synology.com/en-us/knowledgebase/tutorials/496) on the DS. Otherwise you'll get strange rsync errors on the NS2. Note: SSH with the default encryption is pretty heavy for the CPU of the NS2. You'll get a transfer speed of 3-4 MB/s. I've yet to test arcfour encryption or using the rsync daemon directly (i.e. without encryption). Configuring rsnapshot ===================== -
frankkusters revised this gist
Feb 12, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -63,4 +63,4 @@ For added security - Disable SSH logins on the NS2 (disable `sshd`). - [*Only* allow logins with SSH key on the DS](http://www.chainsawonatireswing.com/2012/01/23/disallow-logging-in-to-a-synology-diskstation-with-passwords-only-allow-logging-in-via-ssh-keys/). -
frankkusters revised this gist
Feb 12, 2015 . 2 changed files with 13 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -51,6 +51,13 @@ Edit `/opt/etc/rsnapshot.conf`. Make sure backups are stored in `/shares/MyShare My `rsnapshot.conf` is shown below. The excludes in the configuration are inspired by [this Stack Exchange question](http://unix.stackexchange.com/questions/104743/entries-i-can-safely-exclude-doing-backups). Running rsnapshot automatically =============================== 1. [Set an editor to edit crontab](http://www.readynas.com/forum/viewtopic.php?f=3&t=22784): `export EDITOR=/bin/vi` 2. Edit crontab: `crontab -e`. See my crontab below. For added security ================== This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ # m h dom mon dow command 0 * * * * /opt/bin/rsnapshot hourly 50 4 * * * /opt/bin/rsnapshot daily 40 4 * * 1 /opt/bin/rsnapshot weekly 30 4 2 * * /opt/bin/rsnapshot monthly 30 4 1 3,9 * /opt/bin/rsnapshot halfyearly -
frankkusters revised this gist
Feb 11, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -56,4 +56,4 @@ For added security - Disable SSH logins on the NS2 (disable `sshd`). - [*Only* allow logins with SSH key on the DS](http://www.chainsawonatireswing.com/2012/01/23/disallow-logging-in-to-a-synology-diskstation-with-passwords-only-allow-logging-in-via-ssh-keys/). -
frankkusters renamed this gist
Feb 11, 2015 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 1 addition and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -48,9 +48,7 @@ Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. Make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. My `rsnapshot.conf` is shown below. The excludes in the configuration are inspired by [this Stack Exchange question](http://unix.stackexchange.com/questions/104743/entries-i-can-safely-exclude-doing-backups). For added security -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 4 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -9,6 +9,8 @@ I need a backup solution for my Synology DS215j NAS. My requirements are: Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this task. Let's install and configure rsnapshot! Note: proficiency with Linux is assumed! Installing software on the Network Space 2 ========================================== @@ -39,6 +41,8 @@ To be able to make backups of the entire system, including DSM configuration and 3. [Enable SSH with SSH keys](http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/) (this is a Synology-specific manual). Use the NS2 key from `/root/.ssh/id_rsa.pub`. 4. [Enable the rsync daemon](https://www.synology.com/en-us/knowledgebase/tutorials/496) on the DS. Otherwise you'll get strange rsync errors on the NS2. Configuring rsnapshot ===================== -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 2 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -44,6 +44,8 @@ Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. Make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. The excludes in the configuration are inspired by [this Stack Exchange question](http://unix.stackexchange.com/questions/104743/entries-i-can-safely-exclude-doing-backups). My `rsnapshot.conf` is shown below. -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,7 +42,9 @@ To be able to make backups of the entire system, including DSM configuration and Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. Make sure backups are stored in `/shares/MyShare`, as `/shares/OpenShare` is readable by everyone on the network - we don't want that. We'll open up `MyShare` later. My `rsnapshot.conf` is shown below. For added security -
frankkusters revised this gist
Feb 10, 2015 . 2 changed files with 173 additions and 3 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -42,9 +42,7 @@ To be able to make backups of the entire system, including DSM configuration and Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. Make sure backups are stored in `/shares/MyShare`. My `rsnapshot.conf` is shown below. For added security This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,172 @@ ################################################# # rsnapshot.conf - rsnapshot configuration file # ################################################# # # # PLEASE BE AWARE OF THE FOLLOWING RULES: # # # # This file requires tabs between elements # # # # Directories require a trailing slash: # # right: /home/ # # wrong: /home # # # ################################################# ####################### # CONFIG FILE VERSION # ####################### config_version 1.2 ########################### # SNAPSHOT ROOT DIRECTORY # ########################### # All snapshots will be stored under this root directory. snapshot_root /shares/MyShare/ # If no_create_root is enabled, rsnapshot will not automatically create the # snapshot_root directory. This is particularly useful if you are backing # up to removable media, such as a FireWire drive. # #no_create_root 1 ################################# # EXTERNAL PROGRAM DEPENDENCIES # ################################# # LINUX USERS: Be sure to uncomment "cmd_cp". This gives you extra features. # EVERYONE ELSE: Leave "cmd_cp" commented out for compatibility. # # See the README file or the man page for more details. # cmd_cp /opt/bin/cp # uncomment this to use the rm program instead of the built-in perl routine. cmd_rm /opt/bin/rm # rsync must be enabled for anything to work. cmd_rsync /opt/bin/rsync # Uncomment this to enable remote ssh backups over rsync. cmd_ssh /opt/bin/ssh # Comment this out to disable syslog support. #cmd_logger /path/to/logger # Uncomment this to specify a path to "du" for disk usage checks. cmd_du /opt/bin/du ######################################### # BACKUP INTERVALS # # Must be unique and in ascending order # # i.e. hourly, daily, weekly, etc. # ######################################### interval hourly 24 interval daily 7 interval weekly 4 interval monthly 12 interval halfyearly 10 ############################################ # GLOBAL OPTIONS # # All are optional, with sensible defaults # ############################################ # If your version of rsync supports --link-dest, consider enable this. # This is the best way to support special files (FIFOs, etc) cross-platform. # The default is 0 (off). # link_dest 1 # Verbose level, 1 through 5. # 1 Quiet Print fatal errors only # 2 Default Print errors and warnings only # 3 Verbose Show equivalent shell commands being executed # 4 Extra Verbose Show extra verbose information # 5 Debug mode More than you care to know # verbose 2 # Same as "verbose" above, but controls the amount of data sent to the # logfile, if one is being used. The default is 3. loglevel 3 # If you enable this, data will be written to the file you specify. The # amount of data written is controlled by the "loglevel" parameter. logfile /opt/var/log/rsnapshot # The include and exclude parameters, if enabled, simply get passed directly # to rsync. If you have multiple include/exclude patterns, put each one on a # seperate line. Please look up the --include and --exclude options in the # rsync man page for more details. # #include ??? #include ??? #exclude ??? #exclude ??? exclude /dev exclude /proc exclude /run exclude /sys exclude /tmp # The include_file and exclude_file parameters, if enabled, simply get # passed directly to rsync. Please look up the --include-from and # --exclude-from options in the rsync man page for more details. # #include_file /path/to/include/file #exclude_file /path/to/exclude/file # Default rsync args. All rsync commands have at least these options set. # #rsync_short_args -a #rsync_long_args --no-o --delete --relative --delete-excluded # ssh has no args passed by default, but you can specify some here. # #ssh_args -p 22 # Default arguments for the "du" program (for disk space reporting). # The GNU version of "du" is preferred. See the man page for more details. # #du_args -csh # If this is enabled, rsync won't span filesystem partitions within a # backup point. This essentially passes the -x option to rsync. # The default is 0 (off). # #one_fs 0 # If enabled, rsnapshot will write a lockfile to prevent two instances # from running simultaneously (and messing up the snapshot_root). # If you enable this, make sure the lockfile directory is not world # writable. Otherwise anyone can prevent the program from running. # lockfile /opt/var/run/rsnapshot.pid ############################### ### BACKUP POINTS / SCRIPTS ### ############################### # LOCALHOST #backup /home/ localhost/ #backup /etc/ localhost/ #backup /opt/etc/ localhost/ #backup /usr/local/ localhost/ #backup /etc/passwd localhost/ #backup /home/foo/My Documents/ localhost/ #backup /foo/bar/ localhost/ one_fs=1, rsync_short_args=-urltvpog #backup_script /usr/local/bin/backup_pgsql.sh localhost/postgres/ # EXAMPLE.COM #backup [email protected]:/home/ example.com/ backup [email protected]:/ ./ # CVS.SOURCEFORGE.NET #backup_script /usr/local/bin/backup_rsnapshot_cvsroot.sh cvs.sourceforge.net/ # RSYNC.SAMBA.ORG #backup rsync://rsync.samba.org/rsyncftp/ rsync.samba.org/rsyncftp/ -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -40,6 +40,13 @@ To be able to make backups of the entire system, including DSM configuration and 3. [Enable SSH with SSH keys](http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/) (this is a Synology-specific manual). Use the NS2 key from `/root/.ssh/id_rsa.pub`. Configuring rsnapshot ===================== Edit `/opt/etc/rsnapshot.conf`. Change these settings: snapshot_root /shares/MyShare/ For added security ================== -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 23 additions and 10 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,16 +10,9 @@ I need a backup solution for my Synology DS215j NAS. My requirements are: Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this task. Let's install and configure rsnapshot! Installing software on the Network Space 2 ========================================== The NS2 does not have the ability to create backups from another NAS (for example through rsync) through its web interface. Therefore, I need to install a backup utility through SSH. 1. Update the firmware. The latest release (as of February 10th, 2015) fixes the Shellshock vulnerability. It would be a shame to have our little backup server hacked. @@ -32,4 +25,24 @@ The NS2 does not have the ability to create backups from another NAS (for exampl 5. [Install `ipkg`](http://forum.nas-central.org/viewtopic.php?f=236&t=2348). Some small details differ. See `install-ipkg.sh` below. 6. Install rsnapshot: `ipkg install rsnapshot`. Setting up passwordless SSH from the NS2 to the Synology DiskStation ==================================================================== To be able to make backups of the entire system, including DSM configuration and any other modifications, the NS2 needs SSH access with root permissions. 1. [Enable the User Home Service](https://www.synology.com/en-us/knowledgebase/tutorials/449) on the DS. 2. Generate a public key on the NS2. 3. [Enable SSH with SSH keys](http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/) (this is a Synology-specific manual). Use the NS2 key from `/root/.ssh/id_rsa.pub`. For added security ================== - Disable SSH logins on the NS2 (disable `sshd`). - [Only allow logins with SSH key on the DS](http://www.chainsawonatireswing.com/2012/01/23/disallow-logging-in-to-a-synology-diskstation-with-passwords-only-allow-logging-in-via-ssh-keys/). -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 8 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -10,6 +10,14 @@ I need a backup solution for my Synology DS215j NAS. My requirements are: Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this task. Let's install and configure rsnapshot! Configuring the Synology DiskStation ==================================== To be able to make backups of the entire system, including DSM configuration and any other modifications, the NS2 needs SSH access with root permissions. 1. [Enable the User Home Service](https://www.synology.com/en-us/knowledgebase/tutorials/449). 2. [Enable SSH with SSH keys](http://www.chainsawonatireswing.com/2012/01/15/ssh-into-your-synology-diskstation-with-ssh-keys/) (this is a Synology-specific manual. For generic information on SSH keys, [go here](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2)). Configuring the Network Space 2 =============================== The NS2 does not have the ability to create backups from another NAS (for example through rsync) through its web interface. Therefore, I need to install a backup utility through SSH. -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -7,7 +7,7 @@ I need a backup solution for my Synology DS215j NAS. My requirements are: - a restore solution that is really easy to use for everyone else in my house. - highly frequent backups. With modern storage technologies, it's unnecessary to lose more than an hour's worth of work. Also, I have a LaCie Network Space 2 lying around, which is perfectly up to this task. Let's install and configure rsnapshot! Configuring the Network Space 2 -
frankkusters revised this gist
Feb 10, 2015 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -22,6 +22,6 @@ The NS2 does not have the ability to create backups from another NAS (for exampl 4. As suggested in the manual for step 3, [set up login with SSH keys](https://www.digitalocean.com/community/tutorials/how-to-set-up-ssh-keys--2). 5. [Install `ipkg`](http://forum.nas-central.org/viewtopic.php?f=236&t=2348). Some small details differ. See `install-ipkg.sh` below. 6. Install rsnapshot: `ipkg install rsnapshot`.
NewerOlder