Issues out of nowhere
#14
(05-12-2018, 08:13 AM)fsa317 Wrote: I have a separate ubuntu system that has a really large hard drive with some free space.   To do what you described, do I run rsnapshot on the P64 or on the "other" system?  I'm assuming I can run it on the P64 but have the output snapshot go to shared folder on the other system?

You install rsync on your P64, and rsync and rsnapshot on your ubuntu system if they aren't installed already. You need ssh keys as well so you can connect to the P64 as root and without a password.

Then you just need to configure rsnapshot, below is a basic config file, tweak as needed and save it as /etc/rsnapshot.conf. Using it will keep 12 monthly backups, 4 weekly backups and 7 daily backups. You could do hourly but I find that is usually over kill for most setups.

Code:
config_version  1.2

cmd_cp          /bin/cp
cmd_rm          /bin/rm
cmd_rsync       /usr/bin/rsync
cmd_ssh         /usr/bin/ssh
cmd_logger      /usr/bin/logger
cmd_du          /usr/bin/du

interval        daily   7
interval        weekly  4
interval        monthly 12

verbose         1
loglevel        3
logfile /var/log/rsnapshot.log

rsync_short_args        -ADlpRrtz
rsync_long_args         --numeric-ids --delete-during --delete-excluded
lockfile        /var/run/rsnapshot.pid

snapshot_root   /path/to/save/rsnapshot/backups/

backup  root@192.168.x.x:/etc/                 192.168.x.x/
backup  root@192.168.x.x:/home/                192.168.x.x/
backup  root@192.168.x.x:/root/                192.168.x.x/
backup  root@192.168.x.x:/usr/                 192.168.x.x/
backup  root@192.168.x.x:/var/                 192.168.x.x/


You can then do a test run, rsnapshot -V -t -c /etc/rsnapshot.conf daily

This will tell you if ssh is working and output files it would have copied

Then you just need to edit /etc/crontab

Code:
0  22   * * *   root    /usr/bin/rsnapshot -V -c /etc/rsnapshot.conf daily
30 21   * * 7   root    /usr/bin/rsnapshot -V -c /etc/rsnapshot.conf weekly
0  21   1 * *   root    /usr/bin/rsnapshot -V -c /etc/rsnapshot.conf monthly


I like reports, but if you only want errors remove -V from the commands.

The above only copies /etc /home /root /usr and /var, you may not need to copy all of those, or you may wish to include more directories, it really depends on your setup. Basically you only need to backup what you have changed or data that gets saved and so on, and when you do a fresh install most libraries and binaries will already exist.



(05-12-2018, 03:58 PM)pfeerick Wrote: Just keep in mind the rsnapshot is more for data files... you won't be able to make a bootable backup media that way. If that is your intent (i.e. a save point so if the card really does fail you can just image a new one and pick up from that already configured point) I just use dd (i.e. dd if=/dev/<microsd> of=/home/<username>/<image-name> bs=1MB progress=status) and pipe the output to pxz to compress it so I have a compressed backup of the entire microSD if there is a particular one I want to preserve.

rsnapshot allows you to take near live backups, rather than taking the P64 offline to clone, and rsnapshot can happen automatically, so you don't have to remember to do anything.

Also rsnapshot only backs up changed files, with an image you also backup empty space as well as duplicating all the libraries and binaries, regardless if they change or not.

It all depends on your specific situation, and preferences.
  Reply


Messages In This Thread
Issues out of nowhere - by fsa317 - 05-11-2018, 06:29 PM
RE: Issues out of nowhere - by evilbunny - 05-11-2018, 06:47 PM
RE: Issues out of nowhere - by fsa317 - 05-11-2018, 07:00 PM
RE: Issues out of nowhere - by evilbunny - 05-11-2018, 07:11 PM
RE: Issues out of nowhere - by fsa317 - 05-11-2018, 07:46 PM
RE: Issues out of nowhere - by evilbunny - 05-11-2018, 08:13 PM
RE: Issues out of nowhere - by fsa317 - 05-11-2018, 08:20 PM
RE: Issues out of nowhere - by evilbunny - 05-11-2018, 09:10 PM
RE: Issues out of nowhere - by pfeerick - 05-12-2018, 04:11 AM
RE: Issues out of nowhere - by fsa317 - 05-12-2018, 06:46 AM
RE: Issues out of nowhere - by evilbunny - 05-12-2018, 06:51 AM
RE: Issues out of nowhere - by fsa317 - 05-12-2018, 08:13 AM
RE: Issues out of nowhere - by evilbunny - 05-12-2018, 04:07 PM
RE: Issues out of nowhere - by pfeerick - 05-12-2018, 03:58 PM
RE: Issues out of nowhere - by fsa317 - 05-13-2018, 07:11 AM
RE: Issues out of nowhere - by evilbunny - 05-13-2018, 03:16 PM
RE: Issues out of nowhere - by pfeerick - 05-13-2018, 07:01 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Ethernet connection issues jpnh 2 4,107 11-22-2016, 06:59 AM
Last Post: jpnh
  New Ubuntu ML-Anderal 4-20-16 Issues AUDIOTEK 2 4,218 08-14-2016, 06:03 PM
Last Post: AUDIOTEK
  Auto updater issues Ubuntu Mate Gnx 0 1,958 06-10-2016, 04:51 PM
Last Post: Gnx
Question Issues with Ubuntu MATE joneszn 5 9,497 04-23-2016, 12:52 PM
Last Post: joneszn

Forum Jump:


Users browsing this thread: 1 Guest(s)